package _08Stream流的数据收集;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class DemoSreamToList {
    public static void main(String[] args) {
        //将流数据收集到List集合中
        Stream<Integer> streamCount = Stream.of(11, 22, 33, 44, 55, 66);
        List<Integer> list = streamCount.collect(Collectors.toList());
        for (Integer integer : list) {
            System.out.println(integer);
        }

    }
}
